package com.gradumate.shared;

import java.util.ArrayList;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * Defineerd een site object binnen Alfresco.
 * Gebruikt Serializable om RPC data te deserializen
 * @author Hugo Zonderland
 */
public class Site implements IsSerializable {

	private String url;
	private String sitePreset;
	private String shortName;
	private String title;
	private String description;
	private String node;
	private String tagScope;
	private ArrayList<String> siteManagers;
	private boolean isPublic;
	private String visibility;

	public Site() {

	}

	public Site(String url, String sitePreset, String shortName, String title, String description, String node, String tagScope, ArrayList<String> siteManagers, boolean isPublic, String visibility) {
		this.url = url;
		this.sitePreset = sitePreset;
		this.shortName = shortName;
		this.title = title;
		this.description = description;
		this.node = node;
		this.tagScope = tagScope;
		this.siteManagers = siteManagers;
		this.isPublic = isPublic;
		this.visibility = visibility;
	}

	/**
	 * @return the url
	 */
	public String getUrl() {
		return url;
	}

	/**
	 * @param url
	 *            the url to set
	 */
	public void setUrl(String url) {
		this.url = url;
	}

	/**
	 * @return the sitePreset
	 */
	public String getSitePreset() {
		return sitePreset;
	}

	/**
	 * @param sitePreset
	 *            the sitePreset to set
	 */
	public void setSitePreset(String sitePreset) {
		this.sitePreset = sitePreset;
	}

	/**
	 * @return the shortName
	 */
	public String getShortName() {
		return shortName;
	}

	/**
	 * @param shortName
	 *            the shortName to set
	 */
	public void setShortName(String shortName) {
		this.shortName = shortName;
	}

	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param title
	 *            the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description
	 *            the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the node
	 */
	public String getNode() {
		return node;
	}

	/**
	 * @param node
	 *            the node to set
	 */
	public void setNode(String node) {
		this.node = node;
	}

	/**
	 * @return the tagScope
	 */
	public String getTagScope() {
		return tagScope;
	}

	/**
	 * @param tagScope
	 *            the tagScope to set
	 */
	public void setTagScope(String tagScope) {
		this.tagScope = tagScope;
	}

	/**
	 * @return the siteManagers
	 */
	public ArrayList<String> getSiteManagers() {
		return siteManagers;
	}

	/**
	 * @param siteManagers
	 *            the siteManagers to set
	 */
	public void setSiteManagers(ArrayList<String> siteManagers) {
		this.siteManagers = siteManagers;
	}

	/**
	 * @return the isPublic
	 */
	public boolean isPublic() {
		return isPublic;
	}

	/**
	 * @param isPublic
	 *            the isPublic to set
	 */
	public void setPublic(boolean isPublic) {
		this.isPublic = isPublic;
	}

	/**
	 * @return the visibility
	 */
	public String getVisibility() {
		return visibility;
	}

	/**
	 * @param visibility
	 *            the visibility to set
	 */
	public void setVisibility(String visibility) {
		this.visibility = visibility;
	}
	
	/**
	 * Objectdata
	 */
	public String toString() {
		String s = "SITE OUTPUT:\n";
		s += "- Title: " + title + "\n";
		s += "- Description: " + description + "\n";
		s += "- Sitepreset: " + sitePreset + "\n";
		s += "- Shortname: " + shortName + "\n";
		s += "- Node: " + node + "\n";
		s += "- Tagscope: " + tagScope + "\n";
		s += "- Sitemanagers: " + siteManagers.size() + "\n";
		s += "- isPublic: " + isPublic + "\n";
		s += "- Visibility: " + visibility + "\n";
		return s;
	}
}
